package com.zhiwang.xiaoqu.mvp.model

interface MoneyDetailModel {

    fun type(): Int

    fun date(): String?

    fun name(): String?

    fun icon(): String?

    fun time(): String?

    fun rewardSum(): String?


}


data class MoneyHeaderModel(var sum: Int, var date: String) : MoneyDetailModel {

    override fun type() = 0

    override fun date() = date

    override fun name(): String? = null

    override fun icon(): String? = null

    override fun time(): String? = null

    override fun rewardSum(): String? = sum.toString()

}

/**
 *  "type": "8",
"number": "-500000",
"cost_text": "申请提现50元, 手续费1元, 实际到账49元",
"date": "2019-09-18 15:04:32"
 */
data class MoneyItemModel(var time: String, var number: Int, var desc: String) : MoneyDetailModel {

    override fun type() = 1

    override fun date(): String? = time
    override fun name(): String? = desc

    override fun icon(): String? = null

    override fun time(): String? = null

    override fun rewardSum(): String? = number.toString()
}